//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Opciones.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormOpciones *FormOpciones;
//---------------------------------------------------------------------------
__fastcall TFormOpciones::TFormOpciones(TComponent* Owner)
        : TForm(Owner)
{
        
}
//---------------------------------------------------------------------------
void __fastcall TFormOpciones::coloresClick(TObject *Sender)
{
        Paleta->Enabled = ! Paleta->Enabled;
        if (Paleta->Enabled){
               Paleta->Color = clBtnFace;
        }else {
               Paleta->Color = clInactiveCaptionText;
        }
}
//---------------------------------------------------------------------------
void __fastcall TFormOpciones::blueChange(TObject *Sender)
{
      CambiaColor();
}
//---------------------------------------------------------------------------
void TFormOpciones::CambiaColor(){
        int color = blue->Position * 256 * 256 +
                    green->Position * 256 +
                    red->Position;
        muestra->Color = color;
}
void __fastcall TFormOpciones::greenChange(TObject *Sender)
{
      CambiaColor();
}
//---------------------------------------------------------------------------
void __fastcall TFormOpciones::redChange(TObject *Sender)
{
        CambiaColor();        
}
//---------------------------------------------------------------------------
void __fastcall TFormOpciones::FormCreate(TObject *Sender)
{
        CambiaColor();
}
//---------------------------------------------------------------------------

